//
//  UIView+Category.h
//  YJJY
//
//  Created by aa on 2018/4/13.
//  Copyright © 2018年 金刚葫芦娃. All rights reserved.
//

#import <UIKit/UIKit.h>

IB_DESIGNABLE

@interface UIView (Category)
@property (nonatomic, assign)CGFloat x;
@property (nonatomic, assign)CGFloat y;
@property (nonatomic, assign)CGFloat width;
@property (nonatomic, assign)CGFloat height;
@property (nonatomic, assign)CGFloat centerX;
@property (nonatomic, assign)CGFloat centerY;
@property (nonatomic, assign)CGSize size;
@property(nonatomic, assign) IBInspectable CGFloat borderWidth;
@property(nonatomic, assign) IBInspectable UIColor *borderColor;
@property(nonatomic, assign) IBInspectable CGFloat cornerRadius;
/**
*  水平居中
*/
- (void)alignHorizontal;
/**
*  垂直居中
*/
- (void)alignVertical;
/**
*  判断是否显示在主窗口上面
*
*  @return 是否
*/
- (BOOL)isShowOnWindow;

- (UIViewController *)parentController;
/**
 *  自动调整布局
 *
 *  @param subView 传入要调整的view
 */
- (void)viewLayoutAllEdgesOfSubview:(UIView *)subView;
@end
